package com.javalong.affairs.base.utils;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;

import com.javalong.affairs.base.listener.DialogCallBack;

public class DialogUtils {

	/**
	 * @author ygh 2015/5/27 弹出框 确认操作
	 */
	public static void showLogoutConfirmDialog(String content, Context context,
			final DialogCallBack callBack) {
		new AlertDialog.Builder(context)
				.setNegativeButton("取消", new OnClickListener() {
					@Override
					public void onClick(DialogInterface dialog, int which) {
						dialog.dismiss();
						callBack.cancelCallback();
					}
				}).setPositiveButton("确认", new OnClickListener() {
					@Override
					public void onClick(DialogInterface dialog, int which) {
						dialog.dismiss();
						callBack.okCallback();
					}
				}).setMessage(content).create().show();
	}

	/**
	 * @author ygh 确认框
	 */
	public static void showConfirmDialog(String content ,Context context,final DialogCallBack callBack) {
		new AlertDialog.Builder(context)
				.setNegativeButton("取消", new OnClickListener() {
					@Override
					public void onClick(DialogInterface dialog, int which) {
						dialog.dismiss();
						callBack.cancelCallback();
					}
				}).setPositiveButton("确认", new OnClickListener() {
					@Override
					public void onClick(DialogInterface dialog, int which) {
						dialog.dismiss();
						callBack.okCallback();
					}
				}).setMessage(content)
				.create().show();
	}

	// 图片处理界面
	public static void showImageDealDialog() {
	}
}
